package com.wyd.factory;

/**
 * 工厂模式
 * 将实例化委托给生成一组产品的工厂
 *
 * @author Yudi Wang
 * @date 2022/1/27 15:51
 */
public class Main {
    public static void main(String[] args) {
        Client client = new Client(new ConcreteFactoryA());
        client.getProduct();
        System.out.println("=======================");
        client.setFactory(new ConcreteFactoryB());
        client.getProduct();
    }
}
